Crate shuttle_axum

source ·
Expand description

Shuttle service integration for the Axum web framework.

Example

use axum::{routing::get, Router};

async fn hello_world() -> &'static str {
    "Hello, world!"
}

#[shuttle_runtime::main]
async fn axum() -> shuttle_axum::ShuttleAxum {
    let router = Router::new().route("/hello", get(hello_world));

    Ok(router.into())
}

Structs

Type Aliases

  • The return type that should be returned from the [shuttle_runtime::main] function.